﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MaxStudio.Concrete.DBUtility
{
    public class ListSet : ArrayList
    {
        public override int Add(Object value)
        {
            if (!this.Contains(value))
                return base.Add(value);
            else
                return -1;
        }

        public override void Insert(int index, Object value)
        {
            if (!this.Contains(value))
                base.Insert(index, value);

        }

        public override void AddRange(ICollection c)
        {
            foreach (Object o in c)
            {
                Add(o);
            }
        }
    }
}
